<?php
class Category extends AppModel {

	var $name = 'Category';
	var $validate = array(
		'name' => array(
			'notEmpty' => array(
				'rule'    => 'notEmpty',
				'message' => 'This field cannot be left blank'
			),
			'maxLength' => array(
				'rule'    => array('maxLength', '64'),
				'message' => 'Name cannot be longer than 64 characters'
			),
			'isUnique' => array(
				'rule'    => 'isUnique',
				'message' => 'Name is alreay taken'
			)
		)
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $hasMany = array(
		'Item' => array(
			'className'    => 'Item',
			'foreignKey'   => 'category_id',
			'dependent'    => false,
			'conditions'   => '',
			'fields'       => '',
			'order'        => '',
			'limit'        => '',
			'offset'       => '',
			'exclusive'    => '',
			'finderQuery'  => '',
			'counterQuery' => ''
		)
	);

}
?>